let resetApp = new Vue({
    el:"#resetApp",
    data:{
        oldPass:'',
        newPass:'',
        confirmPasswd:'',
        hasError:false,
        message:''
    },
    methods:{
        reSet(){
            console.log("submit")
            let data = {
                oldPass : this.oldPass,
                newPass : this.newPass,
                confirmPasswd : this.confirmPasswd
            }
            console.log(data)
            if(data.newPass != data.confirmPasswd){
                this.message = "两次密码不一致"
                this.hasError = true
                return
            }
            axios.post('/portal/user/reset',data)
                .then(result=>{
                    let r = result.data
                    if(r.code == CREATED){
                        this.hasError = false
                        this.message = r.message
                    }
                })

        }
    },
    created(){

    }
})